package com.jiyun.home.controller;

import com.jiyun.common.pojo.home.BaoXian;
import com.jiyun.home.service.BaoXianService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/baoxian")
@CrossOrigin
public class BaoXianController {
    @Autowired
    private BaoXianService baoXianService;
    @RequestMapping("/findAll")
    public List<BaoXian> findAll(){
        List<BaoXian> baoXianList = baoXianService.findAll();
        return baoXianList;
    }
}
